package com.nanjia.boot.stock.productbatch.model.form;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Getter;
import lombok.Setter;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDate;

/**
 * 产品批次主记录表单对象
 *
 * @author 周洋
 * @since 2025-08-21 16:30
 */
@Getter
@Setter
@Schema(description = "产品批次主记录表单对象")
public class ProductBatchForm implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    private Long id;

    @Schema(description = "生产批号")
    @NotBlank(message = "生产批号不能为空")
    @Size(max = 50, message = "生产批号长度不能超过50个字符")
    private String batchNumber;

    @Schema(description = "sku")
    @NotNull(message = "sku不能为空")
    private Long skuId;

    @Schema(description = "生产商")
    @NotNull(message = "生产商不能为空")
    private Long manufacturerId;

    @Schema(description = "生产日期")
    @NotNull(message = "生产日期不能为空")
    private LocalDate productionDate;

    @Schema(description = "有效期至")
    @NotNull(message = "有效期至不能为空")
    private LocalDate expiryDate;

    @Schema(description = "灭菌批号")
//    @NotBlank(message = "灭菌批号不能为空")
    @Size(max = 50, message = "灭菌批号长度不能超过50个字符")
    private String sterilizationBatch;

    @Schema(description = "UDI生产标识符")
    @NotBlank(message = "UDI生产标识符不能为空")
    @Size(max = 50, message = "UDI生产标识符长度不能超过50个字符")
    private String udiPi;

    @Schema(description = "生产数量")
    @NotNull(message = "生产数量不能为空")
    private Integer quantityProduced;

    private Long warehouseId;
    private Long warehouseStorageLocationId;

}
